/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uzivatele;

import java.lang.ArrayIndexOutOfBoundsException;

/**
 * Trida pro prevod rank ID na text.
 * @author Jan Lukes
 */
public class UzivatelRank {
    private static String[] UzivateleRank = {"Uživatel", "Manažer", "Administrátor"};
    public static String getNameFromRankId(int ID) throws ArrayIndexOutOfBoundsException{
        if (ID > UzivateleRank.length -1 ){
            throw (new ArrayIndexOutOfBoundsException());
        }else{
            return UzivateleRank[ID];
        }        
    }
    public static String[] returnRankArray (){
        return UzivateleRank;
    }
    
} 
    

